Grid3

A = (4.132793117221089, 3.156784252378981)
B = (4.526435933379707, 3.3167016464434202)
d_{AB} = Distance(A, B)
θ: atan(Slope[Line[A, B]])
a = Line(A, B)
m = 4 (slider from 0 to 10, step 1)
n = 3 (slider from 0 to 10, step 1)
GridPerpABpos = Sequence((x(A) - m * d_{AB} * sin(θ) + j * d_{AB} * cos(θ), y(A) + m * d_{AB} * cos(θ) + j * d_{AB} * sin(θ)), j, -n, n)
GridPerpABneg = Sequence((x(A) + m * d_{AB} * sin(θ) + j * d_{AB} * cos(θ), y(A) - m * d_{AB} * cos(θ) + j * d_{AB} * sin(θ)), j, -n, n)
b = OrthogonalLine(A, a)